home *** CD-ROM | disk | FTP | other *** search
/ 1,000+ Great Games / 1_1000 Games.iso / DOOM / RUNDM_13.ZIP / MAIN.ZIP / RUNDOOM.BAT < prev    next >
Encoding:
DOS Batch File  |  1995-08-10  |  8.7 KB  |  493 lines

  1. @echo off
  2. ::
  3. ::This batch file was designed by Ryan Irby, if the file
  4. ::is not exactly 8865 bytes long, then this is a modified
  5. ::copy, and it is not the original.
  6. ::
  7. ::You can change which game this works on by changing 
  8. ::the line below to the name of the (i.e. - set %game=heretic)
  9.  
  10. set %game=doom
  11.  
  12.  
  13.  
  14. call c:\dos\save.bat
  15. ::
  16. ::You can also change what your drive is with the following line.
  17. ::(i.e. - set %y=x: , where x is the letter of your drive)
  18. SET %y=c:
  19. ver > version.$$$
  20. find /I /C "6." version.$$$
  21. if errorlevel 1 goto wrongver
  22. mem /m ansi.sys > ansi.$$$
  23. find /I /C "not" ansi.$$$
  24. if errorlevel 1 goto doit1
  25. if errorlevel 0 goto noansi
  26.  
  27. :noansi
  28. if not exist c:\dos\devadd.com goto doit1
  29. c:\dos\devadd %y%\dos\ansi.sys
  30.  
  31. :doit
  32. mode con: cols=80 lines=50
  33. cls
  34. echo.
  35. echo The most fun allowed on a computer!
  36. echo 
  37. echo.
  38. pause > nul
  39. cls
  40. echo.
  41. echo Please read the following line.
  42. echo.
  43. echo This batch file was created by Ryan Irby.
  44. echo.
  45. pause > nul
  46.  
  47. :doit1
  48. cls
  49. if %1!==! goto Input
  50. if "%1"=="read" goto Read
  51. if "%1"=="help" goto Help
  52. if "%1"=="clean" goto Cleanup
  53. cls        
  54. if not exist %y%\%game%\wads\nul goto Nowads 
  55.  
  56. :Wadsdir
  57. %y%
  58. if exist %1 move %1 %y%\%game%\wads
  59. if exist %2 move %2 %y%\%game%\wads
  60. if exist %3 move %3 %y%\%game%\wads
  61. cd\%game%\wads
  62. if exist %1 move %1 %y%\%game% 
  63. if exist %2 move %2 %y%\%game%
  64. if exist %3 move %3 %y%\%game%
  65. if not exist %y%\%game%\%1 goto Input
  66. if "%2"=="skip" goto Skip
  67. if "%3"=="skip" goto Skip
  68. if "%4"=="skip" goto Skip
  69. goto Run
  70.  
  71. :Nowads
  72. %y%
  73. if exist %1 move %1 %y%\%game% 
  74. if exist %2 move %2 %y%\%game%
  75. if exist %3 move %3 %y%\%game%
  76. if not exist %y%\%game%\%1 goto Input
  77. if "%2"=="skip" goto Skip
  78. if "%3"=="skip" goto Skip
  79. if "%4"=="skip" goto Skip
  80. goto Run
  81.  
  82. :Read
  83. type c:\dos\rundoom.txt | more
  84. pause > nul
  85. goto End
  86.  
  87. :Help
  88. if not exist c:\dos\devadd.com goto Help1
  89. mode con lines=50
  90. echo.
  91. echo Sorry! No help file has been made at this time!
  92. echo.
  93. echo Call 1-419-468-0186 and ask for Ryan
  94. echo if you desperately need help.
  95. echo.
  96. echo Note: This might be a long-distance call for some.
  97. echo       It is a call to Ohio. Y'know, that little
  98. echo       shield looking thing under Canada.
  99. echo 
  100. echo.
  101. pause
  102. goto End
  103.  
  104. :Help1
  105. echo.
  106. echo Sorry! No help file has been made at this time!
  107. echo.
  108. echo Call 1-419-468-0186 and ask for Ryan
  109. echo if you desperately need help.
  110. echo.
  111. echo Note: This might be a long-distance call for some.
  112. echo       It is a call to Ohio. Y'know, that little
  113. echo       shield looking thing under Canada.
  114. echo. 
  115. echo.
  116. pause
  117. goto End
  118.  
  119. :Input
  120. if not exist c:\dos\devadd.com goto Imput1
  121. echo.
  122. echo Error!  You MUST use a WAD.
  123. echo 
  124. echo.
  125. pause > nul
  126. goto Exit
  127.  
  128. :Input1
  129. echo.
  130. echo Error!  You MUST use a WAD.
  131. echo 
  132. echo.
  133. pause > nul
  134. goto Exit
  135.  
  136.  
  137. :End
  138. %y%
  139. cd\%game%
  140. if not exist %y%\%game%\wads\nul goto Exit
  141. ren doom.wad doom.tmp
  142. if not exist *.wad goto Exit
  143. goto Cleanup
  144.  
  145. :Cleanup
  146. %y%
  147. cd\%game%
  148. if exist doom.wad ren doom.wad doom.tmp
  149. dir *.wad /b /p
  150. echo.
  151. echo Do you want the above WADs put into
  152. echo your %y%\%game%\wads directory?
  153. echo.
  154. echo.
  155. echo.
  156. choice /CYN
  157. if errorlevel 2 goto Exit
  158. if not exist *.wad goto Exit
  159. move *.wad %y%\%game%\wads
  160. ren doom.tmp doom.wad
  161. echo.
  162. echo Clean up complete!
  163. echo.
  164. goto Exit
  165.  
  166. :Run
  167. cls
  168. %y%
  169. cd\%game%
  170. echo Searching for level tags.
  171. echo Please wait...
  172. ctty nul
  173. find /I /C "e1m1" %1
  174. if errorlevel 1 goto TwoA 
  175. SET %l=1
  176. SET %m=1
  177. if errorlevel 0 goto Start
  178.  
  179. :TwoA 
  180. find /I /C "e1m2" %1
  181. if errorlevel 1 goto ThreeA 
  182. SET %l=1
  183. SET %m=2
  184. if errorlevel 0 goto Start
  185.  
  186. :ThreeA
  187. find /I /C "e1m3" %1
  188. if errorlevel 1 goto FourA
  189. set %l=1
  190. set %m=3
  191. if errorlevel 0 goto Start
  192.  
  193. :FourA
  194. find /I /C "e1m4" %1
  195. if errorlevel 1 goto FiveA 
  196. set %l=1
  197. set %m=4
  198. if errorlevel 0 goto Start
  199.  
  200. :FiveA
  201. find /I /C "e1m5" %1
  202. if errorlevel 1 goto SixA
  203. set %l=1
  204. set %m=5
  205. if errorlevel 0 goto Start
  206.  
  207. :SixA
  208. find /I /C "e1m6" %1
  209. if errorlevel 1 goto SevenA 
  210. set %l=1
  211. set %m=6
  212. if errorlevel 0 goto Start
  213.  
  214. :SevenA
  215. find /I /C "e1m7" %1
  216. if errorlevel 1 goto EightA 
  217. set %l=1
  218. set %m=7
  219. if errorlevel 0 goto Start
  220.  
  221. :EightA
  222. find /I /C "e1m8" %1
  223. if errorlevel 1 goto NineA 
  224. set %l=1
  225. set %m=8
  226. if errorlevel 0 goto Start
  227.  
  228. :NineA
  229. find /I /C "e1m9" %1
  230. if errorlevel 1 goto OneB 
  231. set %l=1
  232. set %m=9
  233. if errorlevel 0 goto Start
  234.  
  235. :OneB
  236. find /I /C "e2m1" %1
  237. if errorlevel 1 goto TwoB 
  238. set %l=2
  239. set %m=1
  240. if errorlevel 0 goto Start
  241.  
  242. :TwoB 
  243. find /I /C "e2m2" %1
  244. if errorlevel 1 goto ThreeB 
  245. set %l=2
  246. set %m=2
  247. if errorlevel 0 goto Start
  248.  
  249. :ThreeB
  250. find /I /C "e2m3" %1
  251. if errorlevel 1 goto FourB
  252. set %l=2
  253. set %m=3
  254. if errorlevel 0 goto Start
  255.  
  256. :FourB
  257. find /I /C "e2m4" %1
  258. if errorlevel 1 goto FiveB 
  259. set %l=2
  260. set %m=4
  261. if errorlevel 0 goto Start
  262.  
  263. :FiveB
  264. find /I /C "e2m5" %1
  265. if errorlevel 1 goto SixB
  266. set %l=2
  267. set %m=5
  268. if errorlevel 0 goto Start
  269.  
  270. :SixB
  271. find /I /C "e2m6" %1
  272. if errorlevel 1 goto SevenB 
  273. set %l=2
  274. set %m=6
  275. if errorlevel 0 goto Start
  276.  
  277. :SevenB
  278. find /I /C "e2m7" %1
  279. if errorlevel 1 goto EightB 
  280. set %l=2
  281. set %m=7
  282. if errorlevel 0 goto Start
  283.  
  284. :EightB
  285. find /I /C "e2m8" %1
  286. if errorlevel 1 goto NineB 
  287. set %l=2
  288. set %m=8
  289. if errorlevel 0 goto Start
  290.  
  291. :NineB
  292. find /I /C "e2m9" %1
  293. if errorlevel 1 goto OneC 
  294. set %l=2
  295. set %m=9
  296. if errorlevel 0 goto Start
  297.  
  298. :OneC
  299. find /I /C "e3m1" %1
  300. if errorlevel 1 goto TwoC 
  301. set %l=3
  302. set %m=1
  303. if errorlevel 0 goto Start
  304.  
  305. :TwoC 
  306. find /I /C "e3m2" %1
  307. if errorlevel 1 goto ThreeC 
  308. set %l=3
  309. set %m=2
  310. if errorlevel 0 goto Start
  311.  
  312. :ThreeC
  313. find /I /C "e3m3" %1
  314. if errorlevel 1 goto FourC
  315. set %l=3
  316. set %m=3
  317. if errorlevel 0 goto Start
  318.  
  319. :FourC
  320. find /I /C "e3m4" %1
  321. if errorlevel 1 goto FiveC 
  322. set %l=3
  323. set %m=4
  324. if errorlevel 0 goto Start
  325.  
  326. :FiveC
  327. find /I /C "e3m5" %1
  328. if errorlevel 1 goto SixC
  329. set %l=3
  330. set %m=5
  331. if errorlevel 0 goto Start
  332.  
  333. :SixC
  334. find /I /C "e3m6" %1
  335. if errorlevel 1 goto SevenC 
  336. set %l=3
  337. set %m=6
  338. if errorlevel 0 goto Start
  339.  
  340. :SevenC
  341. find /I /C "e3m7" %1
  342. if errorlevel 1 goto EightC 
  343. set %l=3
  344. set %m=7
  345. if errorlevel 0 goto Start
  346.  
  347. :EightC
  348. find /I /C "e3m8" %1
  349. if errorlevel 1 goto NineC 
  350. set %l=3
  351. set %m=8
  352. if errorlevel 0 goto Start
  353.  
  354. :NineC
  355. find /I /C "e3m9" %1
  356. if errorlevel 1 goto Nofind 
  357. set %l=3
  358. set %m=9
  359. if errorlevel 0 goto Start
  360.  
  361. :Start
  362. ctty con
  363. cls
  364. echo.
  365. echo Choose your skill level:
  366. echo   1) I'm Too Young To Die!
  367. echo   2) Hey, Not Too Rough.
  368. echo   3) Hurt Me Plenty.
  369. echo   4) Ultra-Violence
  370. echo   5) NIGHTMARE!
  371. echo.
  372. choice /C12345
  373. if errorlevel 5 goto doomsk5
  374. if errorlevel 4 goto doomsk4
  375. if errorlevel 3 goto doomsk3
  376. if errorlevel 2 goto doomsk2
  377. if errorlevel 1 goto doomsk1
  378.  
  379. :doomsk5
  380. set %a=5
  381. goto doomit
  382.  
  383. :doomsk4
  384. set %a=4
  385. goto doomit
  386.  
  387. :doomsk3
  388. set %a=3
  389. goto doomit
  390.  
  391. :doomsk2
  392. set %a=2
  393. goto doomit
  394.  
  395. :doomsk1
  396. set %a=1
  397. goto doomit
  398.  
  399. :doomit
  400. echo. | %game% -file %3 %2 %1 -devparm -warp %l% %m% -skill %a%
  401. goto End
  402.  
  403. :Skip
  404. cls
  405. %y%
  406. cd\%game%
  407. echo.
  408. echo Choose your skill level:
  409. echo   1) I'm Too Young To Die!
  410. echo   2) Hey, Not Too Rough.
  411. echo   3) Hurt Me Plenty.
  412. echo   4) Ultra-Violence
  413. echo   5) NIGHTMARE!
  414. echo.
  415. choice /C12345
  416. if errorlevel 5 goto Skip5
  417. if errorlevel 4 goto Skip4
  418. if errorlevel 3 goto Skip3
  419. if errorlevel 2 goto Skip2
  420. if errorlevel 1 goto Skip1
  421.  
  422. :Skip5
  423. set %a=5
  424. goto SkipIt
  425.  
  426. :Skip4
  427. set %a=4
  428. goto SkipIt
  429.  
  430. :Skip3
  431. set %a=3
  432. goto SkipIt
  433.  
  434. :Skip2
  435. set %a=2
  436. goto SkipIt
  437.  
  438. :Skip1
  439. set %a=1
  440. goto SkipIt
  441.  
  442. :SkipIt
  443. if "%2"=="skip" %game% -file %1 -devparm -warp %3 %4 -skill %a%
  444. if "%3"=="skip" %game% -file %2 %1 -devparm -warp %4 %5 -skill %a%
  445. if "%4"=="skip" %game% -file %3 %2 %1 -devparm -warp %5 %6 -skill %a%
  446. goto End
  447.  
  448. :Nofind
  449. ctty con
  450. cls
  451. echo.
  452. echo Could not find a level tag, starting on episode 1 mission 1...               
  453. echo.
  454. pause
  455. SET %l=1
  456. SET %m=1
  457. goto Start
  458.  
  459. :wrongver
  460. if not exist c:\dos\devadd.com goto notver6
  461. echo.
  462. echo 
  463. echo Sorry!  You must have MS-DOS 6.0 or higher
  464. echo         to utilize this batch file, as it    
  465. echo         uses some of the newer features
  466. echo         that come with those versions.
  467. echo.
  468.  
  469. :notver6
  470. echo.
  471. echo. 
  472. echo Sorry!  You must have MS-DOS 6.0 or higher
  473. echo         to utilize this batch file, as it    
  474. echo         uses some of the newer features
  475. echo         that come with those versions.
  476. echo.
  477.  
  478.  
  479. :Exit
  480. if not exist c:\dos\devadd.com goto Exit1
  481. echo 
  482. mode con: cols=80 lines=25
  483. if exist doom.tmp ren doom.tmp doom.wad
  484. if exist *. erase *.
  485. call c:\dos\home.bat
  486. if exist *.$$$ del *.$$$
  487.  
  488. :Exit1
  489. if exist doom.tmp ren doom.tmp doom.wad
  490. if exist *. erase *.
  491. call c:\dos\home.bat
  492. if exist *.$$$ del *.$$$
  493.